![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
The newt larva class - in pond. More...
#include <Newt.h>
Public Member Functions | |
Newt_Larva (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib) | |
Newt_Larva constructor. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Larva () | |
Newt_Larva destructor. More... | |
virtual void | Init (int a_age) |
Newt_larva Initialisation. More... | |
virtual void | Step (void) |
Newt_Larva Step code. This is called continuously until all animals report that they are 'DONE'. More... | |
void | InternalPesticideHandlingAndResponse () |
For handlng of class-specific pesticide effects. More... | |
![]() | |
Newt_Egg (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) | |
Newt_Egg constructor. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Egg () | |
Newt destructor. More... | |
virtual void | Init () |
Newt_Egg Initialisation. More... | |
void | InternalPesticideHandlingAndResponse () |
For handlng of class-specific pesticide effects. More... | |
![]() | |
Newt_Base (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) | |
Newt constructor. More... | |
void | Init (vector< unsigned > a_pond, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
Intitialise object. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Base () | |
Newt destructor. More... | |
virtual int | WhatState () |
Returns the state number for display purposes. More... | |
TTypeOfNewtState | st_Develop (void) |
Behavioural state development - does nothing in the base class. More... | |
TTypeOfNewtState | st_Movement (void) |
Behavioural state movement - does nothing in the base class. More... | |
void | st_Dying (void) |
Behavioural state dying. More... | |
virtual void | BeginStep (void) |
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
virtual void | EndStep (void) |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
unsigned | GetAge () |
A typical interface function - this one returns the Age as an unsigned integer. More... | |
void | SetAge (unsigned a_age) |
A typical interface function - this one sets the Age as an unsigned integer. More... | |
unsigned | GetHomePond () |
A typical interface function - this one returns the home pond reference as an unsigned integer. More... | |
void | SetHomePond (unsigned a_pond) |
A typical interface function - this one sets the home pond reference as an unsigned integer. More... | |
void | InternalPesticideHandlingAndResponse (double) |
For handlng of class-specific pesticide effects. More... | |
![]() | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
virtual bool | OnFarmEvent (FarmToDo) |
![]() | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Static Public Attributes | |
static double | m_LarvaPPPThreshold = cfg_NewtLarvaPPPToxTrigger.value() |
The threshold for effect of PPP on larvae. More... | |
static double | m_LarvaPPPElimRate = cfg_NewtLarvaPPPToxEliminationRate.value() |
The daily proportion of PPP body burden that is not eliminated for larvae. More... | |
static double | m_LarvaPPPEffectProbability = cfg_NewtLarvaPPPEffectProbability.value() |
The daily probability of effect if above m_LarvaPPPThreshold for larvae. More... | |
static double | m_LarvalFoodProportion = cfg_LarvalFoodProportion.value() |
Holds the parameter value for the proportion of food eaten per day relative to size. More... | |
static double | m_LarvaDevelopmentUpperSz = cfg_NewtLarvaDevelThresholdUpperSz.value() |
The upper size at which larvae will undergo metamorphosis. More... | |
static double | m_LarvaDevelopmentLowerSz = cfg_NewtLarvaDevelThresholdLowerSz.value() |
The lower size below which larvae cannot undergo metamorphosis. More... | |
static double | m_LarvaDevelopmentTime = cfg_NewtLarvaDevelThresholdTime.value() |
The time before a larva can undergo metamorphosis. More... | |
static double | m_NewtLarvaDailyGrowthIncrement = cfg_NewtLarvaDailyGrowthIncrement.value() |
The daily growth increment if a larva survives to grow that day. More... | |
static double | m_LarvaMortalityChance = cfg_NewtLarvaMortalityChance.value() |
The daily probability of death from unspecified causes for a larva. More... | |
![]() | |
static double | m_EggPPPThreshold = cfg_NewtEggPPPToxTrigger.value() |
The threshold for effect of PPP on eggs. More... | |
static double | m_EggPPPElimRate = cfg_NewtEggPPPToxEliminationRate.value() |
The daily proportion of PPP body burden that is not eliminated for eggs. More... | |
static double | m_EggPPPEffectProbability = cfg_NewtEggPPPEffectProbability.value() |
The daily probability of effect if above m_EggPPPThreshold for eggs. More... | |
![]() | |
static double | m_EggDevelopmentDDTotal = cfg_NewtEggDevelTotal.value() |
static double | m_EggDevelopmentDDParameter = cfg_NewtEggDevelDDParameter.value() |
static double | m_JuvenileDevelopmentSize = cfg_NewtJuvenileDevelSize.value() |
static double | m_EggMortalityChance = cfg_NewtEggMortalityChance.value() |
static double | m_JuvenileMortalityChance = 0.0 |
static double | m_AdultMortalityChance = 0.0 |
static bool | m_test_pesticide_egg = cfg_Newt_Test_Pesticide_Egg.value() |
Flags to record whether we are in pesticide testing mode. More... | |
static bool | m_test_pesticide_larva = cfg_Newt_Test_Pesticide_Larva.value() |
static bool | m_test_pesticide_terrestrial = cfg_Newt_Test_Pesticide_Terrestrial.value() |
Protected Member Functions | |
virtual TTypeOfNewtState | st_Develop (void) |
Larva development state. More... | |
virtual TTypeOfNewtState | st_NextStage (void) |
Larva metamorphosis. More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_LarvalSize |
Holds the size of the larva, we are assuming length is the critical measure as with the adults. More... | |
![]() | |
double | m_AgeDegrees |
![]() | |
TTypeOfNewtState | m_CurrentNewtState |
Variable to record current behavioural state. More... | |
unsigned | m_Age |
vector< unsigned > | m_pondlist |
Newt_Population_Manager * | m_OurPopulationManager |
This is a time saving pointer to the correct population manager object. More... | |
double | m_body_burden |
The current PPP body burden for use in pesticide testing mode. More... | |
bool | m_reproductiveinhibition |
A flag to indicate environmentally induced reproductive inhibition (value is inherited by descendent classes) More... | |
![]() | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
![]() | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
The newt larva class - in pond.
Newt_Larva::Newt_Larva | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
unsigned | a_age, | ||
bool | a_reproinhib | ||
) |
Newt_Larva constructor.
Newt_Larva constructor Assigns default values to specific larva attributes and passes the age of the larva from the age of the hatching egg.
References Newt_Egg::Init().
Newt_Larva::~Newt_Larva | ( | void | ) |
Newt_Larva destructor.
|
virtual |
Newt_larva Initialisation.
References Newt_Base::m_Age, Newt_Egg::m_AgeDegrees, and m_LarvalSize.
void Newt_Larva::InternalPesticideHandlingAndResponse | ( | ) |
For handlng of class-specific pesticide effects.
This method is re-implemented from Newt_Base for any class which has pesticide response behaviour. If the body burden exceeds the trigger then an effect is tested for and implemented depending on the pesticide type.
References g_msg, g_rand_uni, TAnimal::KillThis(), Newt_Base::m_body_burden, Newt_Base::m_CurrentNewtState, m_LarvaPPPEffectProbability, m_LarvaPPPThreshold, TAnimal::m_OurLandscape, Newt_Base::m_reproductiveinhibition, Landscape::SupplyPesticideType(), toNewts_Die, ttop_AcuteEffects, ttop_MultipleEffects, ttop_NoPesticide, ttop_ReproductiveEffects, and MapErrorMsg::Warn().
Referenced by st_Develop().
void Newt_Larva::ReInit | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
unsigned | a_age, | ||
bool | a_reproinhib | ||
) |
ReInit for object pool.
References Newt_Egg::Init(), and Newt_Egg::ReInit().
Referenced by Newt_Population_Manager::CreateObjects().
|
protectedvirtual |
Larva development state.
Determines whether the larva sucumbs to daily mortality using a probability test against a daily probability (input parameter), if so return toNewts_Die state.
Next there is a test for the availability of food in the pond. If there is not enough food available then they also die.
Then if there is the need to test for pesticide effects then the body-burden is adjusted for yesterdays elimination, then pesticide at this location is determined and any intake stored. If the body-burden is greater than the threshold for effects, then InternalPesticideHandlingAndResponse is called and the impacts determined. If the larva survives:
Reimplemented from Newt_Egg.
References g_rand_uni, InternalPesticideHandlingAndResponse(), Newt_Base::m_Age, Newt_Egg::m_AgeDegrees, Newt_Base::m_body_burden, Newt_Base::m_CurrentNewtState, m_LarvaDevelopmentLowerSz, m_LarvaDevelopmentTime, m_LarvaDevelopmentUpperSz, m_LarvalFoodProportion, m_LarvalSize, m_LarvaMortalityChance, m_LarvaPPPElimRate, m_NewtLarvaDailyGrowthIncrement, TAnimal::m_OurLandscape, Newt_Base::m_pondlist, Newt_Base::m_test_pesticide_larva, Landscape::SubtractPondLarvalFood(), Landscape::SupplyPondPesticide(), toNewts_Develop, toNewts_Die, and toNewts_NextStage.
Referenced by Step().
|
protectedvirtual |
Larva metamorphosis.
Creates a new Newt_Juvenile object and passes the data from the young to it, then signals young object removal.
Reimplemented from Newt_Egg.
References struct_Newt::age, Newt_Population_Manager::CreateObjects(), struct_Newt::L, Newt_Base::m_Age, TALMaSSObject::m_CurrentStateNo, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Newt_Base::m_OurPopulationManager, Newt_Base::m_pondlist, Newt_Base::m_reproductiveinhibition, TALMaSSObject::m_StepDone, struct_Newt::NPM, struct_Newt::pondrefs, Newt_Population_Manager::RecordMetamorphosis(), struct_Newt::reproinhib, toNewts_Remove, tton_Juvenile, struct_Newt::x, and struct_Newt::y.
Referenced by Step().
|
virtual |
Newt_Larva Step code. This is called continuously until all animals report that they are 'DONE'.
Reimplemented from Newt_Egg.
References Newt_Base::m_CurrentNewtState, TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, st_Develop(), Newt_Base::st_Dying(), st_NextStage(), toNewts_Develop, toNewts_Die, toNewts_InitialState, toNewts_NextStage, toNewts_Remove, and Landscape::Warn().
|
static |
The lower size below which larvae cannot undergo metamorphosis.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
The time before a larva can undergo metamorphosis.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
The upper size at which larvae will undergo metamorphosis.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
Holds the parameter value for the proportion of food eaten per day relative to size.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
protected |
Holds the size of the larva, we are assuming length is the critical measure as with the adults.
Referenced by Init(), and st_Develop().
|
static |
The daily probability of death from unspecified causes for a larva.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
The daily probability of effect if above m_LarvaPPPThreshold for larvae.
Referenced by InternalPesticideHandlingAndResponse(), and Newt_Population_Manager::Newt_Population_Manager().
|
static |
The daily proportion of PPP body burden that is not eliminated for larvae.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
The threshold for effect of PPP on larvae.
Class Newt_Larva represents the larval stage of the newt in ponds. Each larva has a location in a pond polygon represented by it's home pond polygon reference (in m_pondlist).
Death can occur by daily mortality probability or due to failing to get daily food intake.
In addition to inherited attributes from Newt_Egg, each larva has:
Referenced by InternalPesticideHandlingAndResponse(), and Newt_Population_Manager::Newt_Population_Manager().
|
static |
The daily growth increment if a larva survives to grow that day.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().